
// 设置全局配置

axios.defaults.baseURL = 'http://123.57.109.30:3007';

// 注册页面的传数据到后台

const getRegister = (ary, fn) => {
    axios({
        method: 'post',
        url: 'http://123.57.109.30:3007/api/reguser',
        data: ary
    }).then(fn)
}


// 登录页面的数据传到后台

const getLogin = (ary, fn) => {
    axios({
        method: 'post',
        url: '/api/login',
        data: ary
    }).then(fn)
}

// 增加分类

const addCate = function (ary, fn) {
    axios({
        method: 'post',
        url: "/my/article/addcates",
        data: ary,
        headers: { 'Authorization': sessionStorage.getItem('token') },
    }).then(fn);
}